<?php
	require "conn.php";
	header("Content-type: text/html; charset=utf-8");
	
	//登录
	if(isset($_POST['str'])){  //str为ajax中传过来的值
		$phone=@$_POST['str'];  //@容错
	}else{
		exit('非法操作');
	}
	
	$query=mysql_query("select * from user where phone='$phone'");
	if(mysql_fetch_array($query)){  //有值代表用户名存在
		echo true;  
	}else{
		echo false;  
	}
	
?>